#ifndef __CTASKPROVIDERS_H__
#define __CTASKPROVIDERS_H__

#include <QObject>
#include <QPluginLoader>
#include <QApplication>
#include <QVector>
#include <QDir>
#include <QDebug>

#include "ITaskProvider.h"

class CTaskProviders : public QObject
{
	Q_OBJECT

public:
	static CTaskProviders* instance();
	bool loadProviders();
	ITaskProvider* taskProvider(int id = 0);
	ITaskProvider* taskProvider(QString taskProviderName);
	QVector<ITaskProvider*> taskProviders();
	QStringList availableTaskProvider();
	
private:
	static CTaskProviders* m_instance;
	CTaskProviders();
	
	QVector<ITaskProvider*> m_providers;
	void tryAddProvider(QObject *plugin);
};

#endif //__CTASKPROVIDERS_H__
